  <?php
$attributes = array('class' => 'editcomment', 'id' => 'editcomment');
			
//			date('Y-m-d H:i:s')echo date("2002-09-08".' H:i:s');
		//print_r($comment_data);
		
		if($comment_data['MemberName']=="")
		{
			
			$name=$comment_data['GuestName'];
			$email=$comment_data['GuestEmail'];
			$guesturl=$comment_data['GuestURL'];
			echo form_hidden('Guest',TRUE);

		}	
		else
		{
		
			$name=$comment_data['MemberName'];
			$email="";
			$guesturl="";
			echo form_hidden('Guest',FALSE);
			echo form_hidden('user_id',$comment_data['MemberID']);
		
		}
			 
echo form_open('admin/EditComment/'.$this->uri->segment(3)."/".$this->uri->segment(4), $attributes);
echo "<div class=\"error\" >".$this->validation->error_string."</div>"; ?>
<?=form_hidden('urltitle',$this->uri->segment(3));?>

   <table width="100%" border="0">
      <tr>
        <td colspan="3"><caption>Edit comment</caption></td>
      </tr>
      <tr>
        <td>Name</td>
        <td colspan="2"><input name="name" size="30" value="<?=$name?>" /></td>
      </tr>
      <tr>
        <td>Email Address</td>
        <td colspan="2"><input name="email" size="30" value="<?=$email;?>" /></td>
      </tr>
      <tr>
        <td>Url</td>
        <td colspan="2"><input name="guesturl" size="30" value="<?=$guesturl;?>" /></td>
      </tr>
      <tr>
        <td>Comment</td>
        <td colspan="2"><textarea name="commentbox" rows="5" cols="35"><?=$comment_data['Content'];?></textarea></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td width="47%"><input type="submit" name="post" value="Submit" /></td>
        <td width="25%"><a href="JavaScript:history.go(-1)">Return to Back</a></td>
      </tr>
    </table>
</form>
    